package cn.pugle.xml;

import cn.pugle.httpcomponent.ClientUtils;
import cn.pugle.httpcomponent.HTTPClientTest;
import org.apache.commons.io.IOUtils;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.impl.client.CloseableHttpClient;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * @author tzp
 * @since 2022/2/10
 */
public class JiraExporter {
    public static void main(String[] args) throws IOException {
        //fetch
        CloseableHttpClient client = ClientUtils.createHttpClient(0, 0, 0);
        HttpGet httpGet = new HttpGet("http://jira.daikuan.qihoo.net/sr/jira.issueviews:searchrequest-xml/15631/SearchRequest-15631.xml");
        httpGet.addHeader("Authorization", "Basic dGlhbnpoaXBlbmctams6MzYwX3R6cDEyMzQ1Njc4OQ==");
        CloseableHttpResponse response = client.execute(httpGet);
        System.out.println(response.getStatusLine());
        String data = IOUtils.toString(response.getEntity().getContent());

    }
}
